<?php
$GLOBALS['Md'] = "Default"; $_syspause = 1;
require_once($_SERVER['DOCUMENT_ROOT'].'/defaultconf.mex');
MYTCONN();
$rate = $GLOBALS['MYT']->db_array("SELECT htr_Tasa FROM hd_cambiosdia 
	INNER JOIN origenes ON OriCTRRef = htr_Tarifa
	WHERE OriNumero = 812 AND htr_Pais = 76 
	AND htr_Corresponsal = 305");

header('Content-Type: image/jpeg');
    /* Attempt to open */
    $im = @imagecreatefromjpeg('cambio.jpg');
	$font = 'VeraSeBd.ttf';
	$white = imagecolorallocate($im, 255, 255, 255);
	$grey = imagecolorallocate($im, 255, 255, 0);
	$black = imagecolorallocate($im, 0, 0, 0); 
	 imagettftext($im, 70, 0, 75, 130, $grey, $font, 'C�MBIO'); 
	// imagettftext($im, 20, 0, 200, 100, $grey, $font, 'Cambio Expresso'); 
	 imagettftext($im, 150, 0, 55, 350, $grey, $font, number_format(round($rate[1]['htr_Tasa'],2),2,',','')); 
	// imagettftext($im, 50, 0, 200, 300, $grey, $font, $rate[2]['htr_NacLocal']);
	  imagejpeg($im);
	  imagedestroy($im);
?> 